# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-term-progressbar
pkgver=2.23
pkgrel=2
pkgdesc="Perl/CPAN Module Term::ProgressBar : Progress bar in just ASCII using Term"
url="https://metacpan.org/release/Term-ProgressBar"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-class-methodmaker perl-term-readkey perl-capture-tiny perl-test-exception"
checkdepends="perl-test-warnings"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/M/MA/MANWAR/Term-ProgressBar-$pkgver.tar.gz"
builddir="$srcdir"/Term-ProgressBar-$pkgver

build() {
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="
86c25446ea909554c206f531f4768a2fc3a9374839c8c307c3485abfe6cd49438452118addf92d85f58e4bca0e22f1ff44cac87a3ad1747a87e475e5f5f6e4d9  Term-ProgressBar-2.23.tar.gz
"
